{{ define "main" }}
    {{ .Scratch.Set "singlePage" true }} <!-- SET singlePage variable -->
    <div class="article-wrapper u-cf single">
        {{  if or (fileExists (print "layouts/partials/content-type/" .Type ".html") ) (fileExists (print "themes/bilberry-hugo-theme/layouts/partials/content-type/" .Type ".html")) }}
            {{ partial (print "content-type/" .Type) . }}
        {{ else }}
            {{ partial "content-type/article" . }}
        {{ end }}
    </div>

    {{ if ( .Params.showComments | default true ) }}
        <div id="comments-container">
            {{ template "_internal/disqus.html" . }}
            {{ template "partials/commento.html" . }}
            {{ partial "comments.html" . }}
        </div>
    {{ end }}

    {{ .Scratch.Set "singlePage" false }} <!-- RESET singlePage variable -->
{{ end }}
